`timescale 1ns / 1ps

//
// CSE141L Lab 2, Part 1: Fetch Datapath
// University of California, San Diego
// 
// Written by Donghwan Jeon, 4/10/2007
// Updated by Sat Garcia, 4/8/2008
//

// Modified by Tiffany Jaya A06919807, 4/13/2011

// sign extention unit
//
// parameters:
// 	IN: data width for the input
// 	OUT: data width for the output
//

module signext_backend#(parameter IN=6, OUT=34)
(
    input   [IN-1:0]    d_i,
    output  [OUT-1:0]   d_o
);

// hint see slides; make sure to parameter

	//assign d_o = { {IN|d_i[IN-1]}, d_i };
	assign d_o = {	{	(OUT-IN){d_i[IN-1]}	}, d_i };
	
endmodule
